#pragma once
#include <set>
#include <nice2d/scene.h>
#include <nice2d/sprite.h>

class QuadTreeScene : public Scene
{
    friend class SpriteVisitor;
    friend class SpriteSearchVisitor;
public:
    QuadTreeScene(const std::string &name = std::string());
    virtual ~QuadTreeScene();
public:
    void addSpriteDeleter(int spriteGroupID, SpriteDeleterPointer deleter);
    void addSpriteController(int spriteGroupID, SpriteControllerPointer controller);
    void addConllisionGroupID(int spriteGroupID);
private:
    virtual void onConllision(SpritePointer current, SpritePointer target);
    void onUpdateScene(float deltaTime) override;
    virtual void onUpdateMyScene(float deltaTime);
private:
    std::unique_ptr<class QuadTreeSceneData> data;
};
